home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / dosutils / tsbat50.zip / EDIT.BAT < prev    next >
DOS Batch File  |  1992-10-25  |  902b  |  39 lines

  1. @echo off
  2. echo
  3. echo ┌─────────────────────────────────────────────┐
  4. echo │ A truly trivial text file editor            │
  5. echo │ By Prof. Timo Salmi, ts@uwasa.fi, 25-Oct-92 │
  6. echo └─────────────────────────────────────────────┘
  7. echo.
  8.  
  9. rem Auxliliary files use drive R: (ramdisk)
  10. if not exist r:\nul goto _noram
  11.  
  12. rem Instructions
  13. if "%1"=="" goto _help
  14.  
  15. rem assure that the file initially exists
  16. if exist %1 goto _doit
  17. rem> %1
  18.  
  19. :_doit
  20. echo Start writing, a row at the time.
  21. echo End with ^Z + Enter, that is Ctrl-Z followed by pressing the Enter Key
  22. copy con r:\tmp$$$ > nul
  23. copy %1 + r:\tmp$$$ /b > nul
  24. if exist r:\tmp$$$ del r:\tmp$$$
  25. goto _out
  26.  
  27. :_noram
  28. echo Drive R: not found
  29. echo Either make in available or edit the batch
  30. echo (I have R: as my ramdisk)
  31. goto _out
  32.  
  33. :_help
  34. echo Usage: EDIT [FileName]
  35. echo Appends text at the end of the named file
  36. echo.
  37.  
  38. :_out
  39.